\hypertarget{classtree_1_1cBinaryRep}{\section{tree\-:\-:c\-Binary\-Rep$<$ T $>$ Class Template Reference}
\label{classtree_1_1cBinaryRep}\index{tree\-::c\-Binary\-Rep$<$ T $>$@{tree\-::c\-Binary\-Rep$<$ T $>$}}
}


{\ttfamily \#include $<$binary\-\_\-rep.\-h$>$}



Collaboration diagram for tree\-:\-:c\-Binary\-Rep$<$ T $>$\-:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=247pt]{classtree_1_1cBinaryRep__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classtree_1_1cBinaryRep_a4218118406b4b792f771f2cffab1fe67}{typedef \hyperlink{structtree_1_1btree__node}{btree\-\_\-node}$<$ T $>$ {\bfseries node\-\_\-type}}\label{classtree_1_1cBinaryRep_a4218118406b4b792f771f2cffab1fe67}

\item 
\hypertarget{classtree_1_1cBinaryRep_af8646ca9dd6c8e2abc30f0a24eea2785}{typedef \hyperlink{classtree_1_1btree__iterator}{btree\-\_\-iterator}$<$ T, \\*
\hyperlink{structtree_1_1btree__node}{node\-\_\-type} $>$ {\bfseries iterator}}\label{classtree_1_1cBinaryRep_af8646ca9dd6c8e2abc30f0a24eea2785}

\item 
\hypertarget{classtree_1_1cBinaryRep_a80d54fe0461119770e3be144672dcbc6}{typedef \\*
\hyperlink{classtree_1_1btree__preorder__iterator}{btree\-\_\-preorder\-\_\-iterator}$<$ T, \\*
\hyperlink{structtree_1_1btree__node}{node\-\_\-type} $>$ {\bfseries preorder\-\_\-iterator}}\label{classtree_1_1cBinaryRep_a80d54fe0461119770e3be144672dcbc6}

\item 
\hypertarget{classtree_1_1cBinaryRep_ad1bba7a7672ee7bdf7ef4979a1b00879}{typedef \hyperlink{classtree_1_1btree__inorder__iterator}{btree\-\_\-inorder\-\_\-iterator}\\*
$<$ T, \hyperlink{structtree_1_1btree__node}{node\-\_\-type} $>$ {\bfseries inorder\-\_\-iterator}}\label{classtree_1_1cBinaryRep_ad1bba7a7672ee7bdf7ef4979a1b00879}

\item 
\hypertarget{classtree_1_1cBinaryRep_a7bef52fb6be8078a9d082c22f9054dd0}{typedef \\*
\hyperlink{classtree_1_1btree__postorder__iterator}{btree\-\_\-postorder\-\_\-iterator}$<$ T, \\*
\hyperlink{structtree_1_1btree__node}{node\-\_\-type} $>$ {\bfseries postorder\-\_\-iterator}}\label{classtree_1_1cBinaryRep_a7bef52fb6be8078a9d082c22f9054dd0}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classtree_1_1cBinaryRep_a7a8f861470cb8538aa03ddbb9cbac6af}{operator==} (const \hyperlink{classtree_1_1cBinaryRep}{c\-Binary\-Rep} \&bin\-\_\-rep)
\item 
\hyperlink{classtree_1_1btree__inorder__iterator}{inorder\-\_\-iterator} \hyperlink{classtree_1_1cBinaryRep_a5701848a04cd825236bc125b33e376d8}{begin\-\_\-inorder} ()
\item 
\hyperlink{classtree_1_1btree__preorder__iterator}{preorder\-\_\-iterator} \hyperlink{classtree_1_1cBinaryRep_a6e912be346d3626156df92eabecee012}{begin\-\_\-preorder} ()
\item 
\hyperlink{classtree_1_1btree__postorder__iterator}{postorder\-\_\-iterator} \hyperlink{classtree_1_1cBinaryRep_a99f4029023bc6b07fade450aceb2f17d}{begin\-\_\-postorder} ()
\item 
\hyperlink{classtree_1_1btree__preorder__iterator}{preorder\-\_\-iterator} \hyperlink{classtree_1_1cBinaryRep_acf645e7e2447eb801c71ac752ecede22}{end} ()
\item 
\hyperlink{classtree_1_1btree__iterator}{iterator} \hyperlink{classtree_1_1cBinaryRep_a1bd7a582b25b1f7a4ff76ea936377458}{insert\-Left\-Child} (\hyperlink{classtree_1_1btree__iterator}{iterator} iter, const T \&data)
\item 
\hyperlink{classtree_1_1btree__iterator}{iterator} \hyperlink{classtree_1_1cBinaryRep_a593596cea8e60e85a0f66fb3354617a8}{insert\-Right\-Child} (\hyperlink{classtree_1_1btree__iterator}{iterator} iter, const T \&data)
\item 
\hypertarget{classtree_1_1cBinaryRep_aae971b4e02baaa0c4d51ce1416ca2178}{\hyperlink{classtree_1_1btree__iterator}{iterator} {\bfseries insert\-Root} (const T \&data)}\label{classtree_1_1cBinaryRep_aae971b4e02baaa0c4d51ce1416ca2178}

\item 
{\footnotesize template$<$typename F\-U\-N\-C $>$ }\\void \hyperlink{classtree_1_1cBinaryRep_aebf973eb7334a5cf2134a51ebc519d33}{traverse} (tree\-\_\-traversal traversal, F\-U\-N\-C \&visit)
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classtree_1_1cBinaryRep_a2b7e8d490a1e5f4b5c58fb58e29330ef}{{\bfseries c\-Binary\-Rep} (const \hyperlink{classtree_1_1cBinaryRep}{c\-Binary\-Rep} \&bin\-\_\-rep)}\label{classtree_1_1cBinaryRep_a2b7e8d490a1e5f4b5c58fb58e29330ef}

\item 
\hypertarget{classtree_1_1cBinaryRep_a4c6eb53e4805dcb0ac0032289bb7d0d8}{\hyperlink{classtree_1_1cBinaryRep}{c\-Binary\-Rep} \& {\bfseries operator=} (const \hyperlink{classtree_1_1cBinaryRep}{c\-Binary\-Rep} \&bin\-\_\-rep)}\label{classtree_1_1cBinaryRep_a4c6eb53e4805dcb0ac0032289bb7d0d8}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classtree_1_1cBinaryRep_acc04e77d74d4c7be7aceb048d512965a}{\hyperlink{structtree_1_1btree__node}{node\-\_\-type} $\ast$ {\bfseries m\-\_\-\-Root}}\label{classtree_1_1cBinaryRep_acc04e77d74d4c7be7aceb048d512965a}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$class tree\-::c\-Binary\-Rep$<$ T $>$}

binary tree usual representation(left node pointing to the left subtree, right node pointing to the right subtree) 

\subsection{Member Function Documentation}
\hypertarget{classtree_1_1cBinaryRep_a5701848a04cd825236bc125b33e376d8}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!begin\-\_\-inorder@{begin\-\_\-inorder}}
\index{begin\-\_\-inorder@{begin\-\_\-inorder}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{begin\-\_\-inorder}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf inorder\-\_\-iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::begin\-\_\-inorder (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a5701848a04cd825236bc125b33e376d8}
returns an iterator to the beginning of the tree for inorder traversal \hypertarget{classtree_1_1cBinaryRep_a99f4029023bc6b07fade450aceb2f17d}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!begin\-\_\-postorder@{begin\-\_\-postorder}}
\index{begin\-\_\-postorder@{begin\-\_\-postorder}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{begin\-\_\-postorder}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf postorder\-\_\-iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::begin\-\_\-postorder (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a99f4029023bc6b07fade450aceb2f17d}
returns an iterator to the beginning of the tree for postorder traversal \hypertarget{classtree_1_1cBinaryRep_a6e912be346d3626156df92eabecee012}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!begin\-\_\-preorder@{begin\-\_\-preorder}}
\index{begin\-\_\-preorder@{begin\-\_\-preorder}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{begin\-\_\-preorder}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf preorder\-\_\-iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::begin\-\_\-preorder (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a6e912be346d3626156df92eabecee012}
returns an iterator to the beginning of the tree for preorder traversal \hypertarget{classtree_1_1cBinaryRep_acf645e7e2447eb801c71ac752ecede22}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!end@{end}}
\index{end@{end}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{end}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf preorder\-\_\-iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::end (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_acf645e7e2447eb801c71ac752ecede22}
returns an empty iterator signifying the end of the tree ! used in constructs like for(iterator it = tree.\-begin(); it != tree.\-end(); it++) \hypertarget{classtree_1_1cBinaryRep_a1bd7a582b25b1f7a4ff76ea936377458}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!insert\-Left\-Child@{insert\-Left\-Child}}
\index{insert\-Left\-Child@{insert\-Left\-Child}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{insert\-Left\-Child}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::insert\-Left\-Child (
\begin{DoxyParamCaption}
\item[{{\bf iterator}}]{iter, }
\item[{const T \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a1bd7a582b25b1f7a4ff76ea936377458}
inserts data as a left child of the node indicated by the iterator \hypertarget{classtree_1_1cBinaryRep_a593596cea8e60e85a0f66fb3354617a8}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!insert\-Right\-Child@{insert\-Right\-Child}}
\index{insert\-Right\-Child@{insert\-Right\-Child}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{insert\-Right\-Child}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf iterator} {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::insert\-Right\-Child (
\begin{DoxyParamCaption}
\item[{{\bf iterator}}]{iter, }
\item[{const T \&}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a593596cea8e60e85a0f66fb3354617a8}
inserts data as a right child of the node indicated by the iterator \hypertarget{classtree_1_1cBinaryRep_a7a8f861470cb8538aa03ddbb9cbac6af}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!operator==@{operator==}}
\index{operator==@{operator==}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf c\-Binary\-Rep}$<$ T $>$ \&}]{bin\-\_\-rep}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_a7a8f861470cb8538aa03ddbb9cbac6af}
checks for equality -- !compares the data in every node of the tree for equality \hypertarget{classtree_1_1cBinaryRep_aebf973eb7334a5cf2134a51ebc519d33}{\index{tree\-::c\-Binary\-Rep@{tree\-::c\-Binary\-Rep}!traverse@{traverse}}
\index{traverse@{traverse}!tree::cBinaryRep@{tree\-::c\-Binary\-Rep}}
\subsubsection[{traverse}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ template$<$typename F\-U\-N\-C $>$ void {\bf tree\-::c\-Binary\-Rep}$<$ T $>$\-::traverse (
\begin{DoxyParamCaption}
\item[{tree\-\_\-traversal}]{traversal, }
\item[{F\-U\-N\-C \&}]{visit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classtree_1_1cBinaryRep_aebf973eb7334a5cf2134a51ebc519d33}
traverse the binary tree in the given tree\-\_\-traversal order takes a function object as a parameter, which must implement operator(\-T) 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
tree/binary\-\_\-rep.\-h\end{DoxyCompactItemize}
